
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>郑州集美整形美容医院</title>

<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=5aee2f67b738f7ce79a6d61f540b1d6d"></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
<link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
<style type="text/css">
    .BMapLib_SearchInfoWindow .BMapLib_nav{display: none;}
    .BMapLib_sendToPhone{display: none;}
</style>

</head>



<body>
   
<div id="allmap" style="height: 585px;width:890px;;overflow:hidden;zoom:1;position:relative;">  
<div id="map" style="height:100%;-webkit-transition: all 0.5s ease-in-out;transition: all 0.5s ease-in-out;"></div>
</div>


<script type="text/javascript">
// 百度地图API功能
    var map = new BMap.Map('map');
    var poi = new BMap.Point(112.624077,35.080209);
    map.centerAndZoom(poi, 17);
    //map.enableScrollWheelZoom();

    //var content = '<div style="margin:0;line-height:20px;padding:2px;">' +
    //              '<img src="#" alt="" style="float:right;zoom:1;overflow:hidden;width:100px;height:100px;margin-left:3px;"/>' +
    //                '地址郑州市金水区东风东路众意路交叉口向东50米路南集美享瑜伽4层<br/>电话：0371-55393995<br/>简介：集美享瑜伽郑州东区馆' +
    //              '</div>';
    var content = '<div style="margin:0;line-height:20px;padding:2px;">' +                    
                    '地址：济源市济源大道东方建国酒店 B座6楼<br/>电话：0391-6665220<br/>简介：济源王艳萍医疗美容医院倡导让每个顾客拥有健康美丽新生活，率先引进济源独家的高科技仪器，呵护出无数自然健康的皮肤,把您的皮肤和身体放心的交给王艳萍美容会所的团队，我们会为您量身定制属于您的健康和美丽...' +
                  '</div>';

    //创建检索信息窗口对象

    var searchInfoWindow = null;
    searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {
            title  : "济源王艳萍医疗美容医院",      //标题
            width  : 320,             //宽度
            height : 150,              //高度
            panel  : "panel",         //检索结果面板

            enableAutoPan : true    //自动平移
            
        });
        

map.addControl(new BMap.NavigationControl());  //添加默认缩放平移控件
map.addControl(new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_RIGHT, type: BMAP_NAVIGATION_CONTROL_SMALL}));  //右上角，仅包含平移和缩放按钮
map.addControl(new BMap.NavigationControl({anchor: BMAP_ANCHOR_BOTTOM_LEFT, type: BMAP_NAVIGATION_CONTROL_PAN}));  //左下角，仅包含平移按钮

map.addControl(new BMap.NavigationControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT, type: BMAP_NAVIGATION_CONTROL_ZOOM}));  //右下角，仅包含缩放按钮

        
    var marker = new BMap.Marker(poi); //创建marker对象
    marker.enableDragging(); //marker可拖拽

    marker.addEventListener("click", function(e){
        searchInfoWindow.open(marker);
    })
    map.addOverlay(marker); //在地图中添加marker
    searchInfoWindow.open(marker); //在marker上打开检索信息串口

    $("close").onclick = function(){
        searchInfoWindow.close();
    }
    $("open").onclick = function(){
        var enableSendToPhone = false;
        if ($("enableSendToPhone").checked) {
            enableSendToPhone = true;
        }
        searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {
            title  : "济源王艳萍医疗美容医院",      //标题
            width  : 290,             //宽度
            height : 105,              //高度
            panel  : "panel",         //检索结果面板

            enableAutoPan : true,     //自动平移
            enableSendToPhone: enableSendToPhone//是否启用发送到手机
            
        });
        if ($("enableAutoPan").checked) {
            searchInfoWindow.enableAutoPan();
        } else {
            searchInfoWindow.disableAutoPan();
        };
        searchInfoWindow.open(marker);
    }
    $("show").onclick = function(){
        searchInfoWindow.show();
    }
    $("hide").onclick = function(){
        searchInfoWindow.hide();
    }
    $("getPosition").onclick = function(){
        var position = searchInfoWindow.getPosition();
        alert("经度：" + position.lng + "；纬度：" + position.lat);
    }
    $("setValue").onclick = function(){
        searchInfoWindow.setPosition(new BMap.Point($("lng").value, $("lat").value));
        searchInfoWindow.setTitle($("title").value);
        searchInfoWindow.setContent($("content").value);
    }
    $("getContent").onclick = function(){
        alert(searchInfoWindow.getContent());
    }
    $("getTitle").onclick = function(){
        alert(searchInfoWindow.getTitle());
    }
    function $(id){
        return document.getElementById(id);
    }

//样式1
var searchInfoWindow1 = new BMapLib.SearchInfoWindow(map, "信息框1内容", {
    title: "信息框1", //标题
    panel : "panel", //检索结果面板

    enableAutoPan : true, //自动平移
    searchTypes :[
        BMAPLIB_TAB_FROM_HERE, //从这里出发

        BMAPLIB_TAB_SEARCH   //周边检索

    ]
});
function openInfoWindow1() {
    searchInfoWindow1.open(new BMap.Point(112.624077,35.080209));
}

//样式2
var searchInfoWindow2 = new BMapLib.SearchInfoWindow(map, "信息框2内容", {
    title: "信息框2", //标题
    panel : "panel", //检索结果面板

    enableAutoPan : true, //自动平移
    searchTypes :[
        BMAPLIB_TAB_SEARCH   //周边检索

    ]
});
function openInfoWindow2() {
    searchInfoWindow2.open(new BMap.Point(113.68300,34.75596));
}

//样式3
var searchInfoWindow3 = new BMapLib.SearchInfoWindow(map, "信息框3内容", {
    title: "信息框3", //标题
    width: 290, //宽度
    height: 40, //高度
    panel : "panel", //检索结果面板

    enableAutoPan : true, //自动平移
    searchTypes :[
    ]
});
function openInfoWindow3() {
    searchInfoWindow3.open(new BMap.Point(113.68300,34.75596)); 
}
    var isPanelShow = false;
    //显示结果面板动作
    $("showPanelBtn").onclick = function(){
        if (isPanelShow == false) {
            isPanelShow = true;
            $("showPanelBtn").style.right = "300px";
            $("panelWrap").style.width = "300px";
            $("map").style.marginRight = "300px";
            $("showPanelBtn").innerHTML = "隐藏检索结果面板<br/>>";
        } else {
            isPanelShow = false;
            $("showPanelBtn").style.right = "0px";
            $("panelWrap").style.width = "0px";
            $("map").style.marginRight = "0px";
            $("showPanelBtn").innerHTML = "显示检索结果面板<br/><";
        }
    }
</script>


</body>
</html>
